def pascal_angel0(n: int, str_pre: str) -> list:
    # 每行输出2n-1个字符
    str_pre = str_pre + " "
    if n == 0:
        print(str_pre, "1")
        return [1]
    # if n == 1:
    #     return [1, 1]

    pls = pascal_angel(n - 1, str_pre)
    ls = [0] * (n + 1)
    for m in range(1, n):
        ls[m] = pls[m - 1] + pls[m]
    ls[0] = 1
    ls[n] = 1
    print(str_pre, " ".join([str(v) for v in ls]))
    return ls


def pascal_angel(n: int, str_sp: str = "   ") -> list:
    # 每行输出2n-1个字符
    if n == 0:
        print("1".center(40))
        return [1]

    pls = pascal_angel(n - 1, str_sp)
    ls = [0] * (n + 1)
    for m in range(1, n):
        ls[m] = pls[m - 1] + pls[m]
    ls[0] = 1
    ls[n] = 1
    print((str_sp.join([str(v) for v in ls])).center(40))
    return ls
